<template>
  <div class="layout_content">
    <!-- 左侧菜单 -->
    <div class="layout_side" :class="{'layout_side_out':appStore.isHeadActive}">
      <Logo :isActive="appStore.isHeadActive"></Logo>
      <Side></Side>
    </div>
    <!-- 头部导航 -->
    <div class="layout_head" :class="{'layout_head_out':appStore.isHeadActive}">
      <Head></Head>
      <Tabs></Tabs>
    </div>
    <!-- 中间内容 -->
    <div class="layout_main" :class="{'layout_main_out':appStore.isHeadActive}">
      <Main></Main>
    </div>
  </div>
</template>

<script setup lang="ts">
import Logo from "@/layouts/Logo/index.vue"
import Side from '@/layouts/Side/index.vue'
import Main from '@/layouts/Main/index.vue'
import Head from '@/layouts/Head/index.vue'
import Tabs from '@/layouts/Tabs/index.vue'
import { useAppStore , useUserStore } from "@/stores"
const appStore=useAppStore()
const userStore=useUserStore()
// 获取用户信息
// userStore.getUserInfo()
</script>

<style lang="scss" scoped>
.layout_content {
  // width: 100%;
  height: 100vh;
  background-color: var(--bg1-color);
  color:var(--text-color);
  .layout_side {
    width: $base-menu-width;
    height: 100vh;
    border-right: 1px solid var(--boder-color);
    // background-color: $base-menu-backgroundColor;
    background-color:var(--bg2-color);
    transition: width $transition-time;
    &.layout_side_out{
        width: $base-menu-min-width;
        // transition: width 0.3s;
    }
  }

  .layout_head{
    width: calc(100% - $base-menu-width);
    height: 90px;
    // background-color: $base-head-backgroundColor;
    background-color:var(--bg2-color);
    border-bottom: 1px solid var(--boder-color);
    position: fixed;
    top: 0px;
    left:$base-menu-width;
    transition: all $transition-time;
    &.layout_head_out{
      width: calc(100% - $base-menu-min-width);
      left:$base-menu-min-width;
    }
  }

  .layout_main {
    width: calc(100% - $base-menu-width);
    height: calc(100vh - 90px);
    // background-color: $base-main-backgroundColor;
    background-color:var(--bg1-color);
    position: absolute;
    top: 90px;
    left: $base-menu-width;
    padding: 15px;
    overflow: auto;
    transition: all $transition-time;
    &.layout_main_out{
      width: calc(100% - $base-menu-min-width);
      left: $base-menu-min-width;
    }
  }
}
</style>
